package com.itheima.mydate;

import java.util.Date;

public class Date入门_01 {
    public static void main(String[] args) {
        //1.通过无参构造创建对象
        Date date1 = new Date();
        System.out.println("date1=" + date1);

        //2.通过带参构造创建对象
        Date date2 = new Date(1000*60*60);
        System.out.println("date2=" + date2);

        long time = System.currentTimeMillis();
        Date date3 = new Date(time-1000*60*60*24);
        System.out.println("date3=" + date3);

    }
}
